#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int diffBit(int m, int n)
{
	int i = m ^ n, count = 0;
	for (int j = 0; j < 32; j++)
	{
		if (i & (1 << j))
			count++;
	}
	return count;
}

int main()
{
	int m, n;
	scanf("%d%d", &m, &n);
	int ret = diffBit(m, n);
	printf("%d\n", ret);
	return 0;
}